// com/tidu/disruptor/event/DataSyncEvent.java
package com.tidu.disruptor.event;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class DataSyncEvent {
    private List<Map<String, Object>> data;
    private long batchId;                    // 批次ID
    private long offset;                     // 该批次的起始offset
    private int batchSize;                   // 批次大小
    private volatile boolean processed = false;  // 是否已处理
    private volatile boolean success = false;    // 是否处理成功

    public boolean isProcessed() {
        return processed;
    }

    public boolean isSuccess() {
        return success;
    }

    public void markProcessed(boolean success) {
        this.processed = true;
        this.success = success;
    }
}
